/*
 * Plugin: Select2
 * ---------------
 */
.select2-dropdown {
  border: 1px solid @form-border-color-focus;
  border-radius: @input-radius;
}

.select2-selection {
  &.select2-container--focus,
  &:focus,
  &:active,
  .select2-selection--single:focus {
    outline: none;
    border: 1px solid @form-border-color-focus; //
  }
}

.select2-search--inline {
  .select2-search__field {
    border: none; //border: 1px solid @border-color; //@gray;
    &:focus {
      outline: none;
      border: none; //border: 1px solid @light-blue;
    }
  }
}

.select2-container--default .select2-results__option[aria-disabled=true] {
  color: #999;
}

.select2-container--default .select2-results__option[aria-selected=true] {
  background-color: @form-select-bg-choice; //#ddd;
  &,
  &:hover {
    color: @form-select-color-choice; //#444;
  }
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: @form-select-bg-hover;
  color: @form-select-color-hover;
}

.form-fusion {
  //Signle select

  .select2-selection {
    background-color: @form-text-bg;
    &.select2-container--focus,
    &:focus,
    &:active {
      outline: none;
      border: 1px solid @form-border-color-focus; //
    }
    .select2-selection--single {
      background-color: @form-text-bg;
      border: 1px solid @border-color; //@gray;
      border-radius: @input-radius;
      padding: 6px 12px;
      height: 34px;
    }
  }
  .select2-container--default.select2-container--open {
    border-color: @form-border-color-focus; //@light-blue;
  }

  .select2-results__option {
    padding: 6px 12px;
    user-select: none;
    -webkit-user-select: none;
  }
  .select2-container .select2-selection--single .select2-selection__rendered {
    padding-left: 0;
    padding-right: 0;
    height: auto;
    margin-top: -4px;
  }
  .select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered {
    padding-right: 6px;
    padding-left: 20px;
  }
  .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 28px;
    right: 3px;
  }
  .select2-container--default .select2-selection--single .select2-selection__arrow b {
    margin-top: 0;
  }

  //Multiple select
  .select2-container--default {
    background-color: @form-text-bg;
    .select2-selection--multiple {
      border: 1px solid @border-color; //@gray;
      border-radius: @input-radius;
      &:focus {
        border-color: @light-blue;
      }
    }
    &.select2-container--focus .select2-selection--multiple{
      border-color: @border-color; //@gray;
      &[aria-expanded=true] {
        border-color: @border-color-focus !important;
      }
    }
  }
  .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: @form-select-bg-choice; //@light-blue;
    border-color: @form-select-border; //darken(@light-blue, 5%);
    padding: 1px 10px;
    color: @form-select-color-choice; //#fff;
  }
  .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    margin-right: 5px;
    color: rgba(255, 255, 255, .7);
    &:hover {
      color: @form-select-color-hover; //#fff;
    }
  }
  .select2-container .select2-selection--single .select2-selection__rendered {
    padding-right: 10px;
  }

  .select2-container--disabled {
    > .selection {
      > .select2-selection {
        .form-readonly-color()
      }
    }
  }
}
